home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Getting date in UNIX
- Date: Wed, 20 Mar 96 21:19:51 GMT
- Organization: none
- Distribution: world
- Message-ID: <827356791snz@genesis.demon.co.uk>
- References: <4ik447$bn7@raffles.technet.sg> <314DB62F.446B@sdrc.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <314DB62F.446B@sdrc.com> greg.dunaway@sdrc.com "Greg Dunaway" writes:
-
- >Leonard Sim wrote:
- >>
- >> Can anyone please inform me how to obtain the date in UNIX C??
- >> I just need the date in this format "dd/mm/yyyy". Thanks!!!
- >>
- >> rdgs,
- >>
- >> Leonard Sim
- >
- >try:
- >
- >date '+%m/%d/%Y'
-
- I hope you don't seriously mean this. If you want a date string in a C
- program it would be totally inappropriate to shell out to an external
- command/program to do it.
-
- >if all else fails, try reading the man pages!
-
- You do have to pick the correct ones.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-